<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditEncomendaStockTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditEncomendaStockLabel_id}" for="id" />
                    <h:inputText id="id" value="#{encomendaStockController.selected.id}" title="#{bundle.EditEncomendaStockTitle_id}" required="true" requiredMessage="#{bundle.EditEncomendaStockRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditEncomendaStockLabel_dataEncomenda}" for="dataEncomenda" />
                    <h:inputText id="dataEncomenda" value="#{encomendaStockController.selected.dataEncomenda}" title="#{bundle.EditEncomendaStockTitle_dataEncomenda}" required="true" requiredMessage="#{bundle.EditEncomendaStockRequiredMessage_dataEncomenda}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditEncomendaStockLabel_dataEntrega}" for="dataEntrega" />
                    <h:inputText id="dataEntrega" value="#{encomendaStockController.selected.dataEntrega}" title="#{bundle.EditEncomendaStockTitle_dataEntrega}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditEncomendaStockLabel_fkHistorico}" for="fkHistorico" />
                    <h:selectOneMenu id="fkHistorico" value="#{encomendaStockController.selected.fkHistorico}" title="#{bundle.EditEncomendaStockTitle_fkHistorico}" required="true" requiredMessage="#{bundle.EditEncomendaStockRequiredMessage_fkHistorico}">
                        <f:selectItems value="#{historicoStockController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditEncomendaStockLabel_fkFornecedor}" for="fkFornecedor" />
                    <h:selectOneMenu id="fkFornecedor" value="#{encomendaStockController.selected.fkFornecedor}" title="#{bundle.EditEncomendaStockTitle_fkFornecedor}" required="true" requiredMessage="#{bundle.EditEncomendaStockRequiredMessage_fkFornecedor}">
                        <f:selectItems value="#{fornecedorStockController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{encomendaStockController.update}" value="#{bundle.EditEncomendaStockSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditEncomendaStockViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{encomendaStockController.prepareList}" value="#{bundle.EditEncomendaStockShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditEncomendaStockIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
